// ignore_for_file: dangling_library_doc_comments, slash_for_doc_comments
import 'dart:convert';
import 'dart:ffi';

import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';

import '../../../common_code/wrapper/dio_wrapper/dio_client.dart';
import '../models/short_video_list_model.dart';

/*** 
 * @Author: Zhong
 * @Date: 2025-08-22 16:59:19
 * @LastEditors: Zhong zhongxiaodong@eenet.com
 * @LastEditTime: 2025-08-26 11:21:49
 * @FilePath: /wan_android_flutter/lib/module_code/short_video/api/short_video_api.dart
 * @Description: 
 */

class ShortVideoApi {
  // 获取视频列表接口
  static Future<List<ShortVideoListItemModel>?> getVideoListData() async {
    // 加载JSON文件
    String jsonString = await rootBundle.loadString('assets/json/video_list.json');
    // 解析JSON字符串
    final jsonData = json.decode(jsonString);

    ShortVideoListModel shortVideoListModel = ShortVideoListModel.fromJson(jsonData);

    return shortVideoListModel.data?.response?.videos;
    
  }
}
